<template>
	<view class="wrapper">
		<view class="list-item flex-between" v-for="(item, index) in tableData" :key="index">
			<view class="title">{{ item.withdrawType === '99' ? '充值' : '提现' }}</view>
			<view :class="['money', item.withdrawType === '99' && 'ad_money']">{{ item.withdrawType === '99' ? '+' : '-' }}{{ item.withdrawMoney }}元</view>
			<view class="time">{{ item.createTime }}</view>
		</view>
	</view>
</template>

<script>
	import apis from '@/apis.js'
	export default {
		data() {
			return {
				listQuery: {
					pageNo: 1,
					pageSize: 10,
					type: 1
				},
				tableData: []
			}
		},
		onLoad() {
			this.getList()
		},
		methods: {
			getList() {
				this.$http.get(apis.payList, this.listQuery).then(res => {
					if (res.data.code === 200) {
						this.tableData = res.data.result.records
					}
				})
			}
		},
		onReachBottom() {
			this.listQuery.pageNo += 1
			this.listQuery.pageSize = 10
			this.getList()
		}
	}
</script>

<style  lang="scss" scoped>
@import "uview-ui/index.scss";
.slot-content {
	display: flex;
	flex-flow: column nowrap;
	font-size: 31rpx;
	color: $u-content-color;
	padding: 80rpx 40rpx;

	.slot-field {
		width: auto;
		text-align: center;
	}
}
.wrapper{
	padding: 0 20px;
	line-height: 50px;
	.list-item{
		border-bottom: 1px solid #BFBFBF;
		.title{
			color: #4D5B80;
			font-size: 20px;
		}
		.money{
			color: #AFC597;
			font-size: 20px;
		}
		.ad_money{
			color: #F77E3C;
		}
		.time{
			color: $econdary-word-color;
			font-size: 14px;
		}
	}
}
</style>
